import _ajax from './request'
// 获取所有频道
function channels () {
  return _ajax({
    url: '/app/v1_0/channels'
  })
}
// 文章列表
function articles (params) {
  return _ajax({
    url: '/app/v1_1/articles',
    params
  })
}
// 获取用户频道
function userChannels () {
  return _ajax({
    url: '/app/v1_0/user/channels'
  })
}
// 新增用户频道列表
function addUserChannel () {
  return _ajax({
    url: '/app/v1_0/user/channels',
    method: 'put'
  })
}
// 删除用户频道
function delUserChannel () {
  return _ajax({
    url: '/app/v1_0/user/channels',
    method: 'put'
  })
}
// 拉黑用户
function blacklists (data) {
  return _ajax({
    url: '/app/v1_0/user/blacklists',
    method: 'post',
    needToken: true,
    data
  })
}
// 举报用户
function articleReports (data) {
  return _ajax({
    url: '/app/v1_0/article/reports',
    method: 'post',
    needToken: true,
    data
  })
}
// 对文章不喜欢
function articleDislikes (data) {
  return _ajax({
    url: '/app/v1_0/article/dislikes',
    method: 'post',
    needToken: true,
    data
  })
}
export {
  channels,
  articles,
  userChannels,
  addUserChannel,
  delUserChannel,
  blacklists,
  articleReports,
  articleDislikes
}
